#include <iostream>
#include <cassert>
#include <functional>
#include <map>
#include <vector>
using namespace std;

template <typename Value>
struct __hashnode
{
	HashNode *next;
	Value val;
};

template <typename Value, typename Key, typename HashFcn, typename ExtractKey,
	typename EqualKey>
struct __hashtable_iterator
{
	typedef __hashtable<Value, Key, HashFcn, ExtractKey, EqualKey> hashtable;
	typedef __hashnode<Value> node;

	typedef forward_iterator_tag iterator_category;
	typedef Value value_type;
	typedef ptrdiff_t difference_type;
	typedef size_t size_type;
	typedef Value& reference;
	typedef Value* pointer;
};

template <typename Value, typename Key, typename HashFcn, typename ExtractKey,
	typename EqualKey>
class __hashtable
{
public:
	typedef __hashtable_iterator<Value, Key, HashFcn, ExtractKey, EqualKey> iterator;
	typedef __hashtable_iterator<const Value, const Key, HashFcn, ExtractKey, EqualKey> const_iterator;

private:
	HashFcn hash;
	ExtractKey get_key;
	EqualKey equals;

	typedef __hashnode<Value> node;

	vector<node*> buckets;
	size_type num_elements;

public:
	size_type bucket_count() const
	{
		return buckets.size();
	}
};

template <typename Value, typename HashFcn = Hash<Value>, 
	typename EqualKey = equal_to<Value> >
class HashSet
{
public:
};

template <typename Key, typename T, typename HashFcn = Hash<Key>, 
	typename EqualKey = equal_to<Key> >
class HashMap
{
private:
	typedef hashtable<pair<const Key, T>, Key, HashFcn, select1st<pair<const Key, T> >, EqualKey> ht;
	ht rep;

};


int main()
{
	return 0;
}